package com.hexiang.servlet;


import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.DubboShutdownHook;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
@Slf4j
public class DestoryServletContextListener implements ServletContextListener {

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        log.warn("DubboShutDownStart");
        DubboShutdownHook.destroyAll();
        log.warn("DubboShutDownEnd");
    }
}
